<!-- 
 * @Description: 根组件
 * @Author: zhen
 * @Date: 2023-10-17
-->
<template>
  <el-config-provider :button="buttonConfig" :size="elementSize">
    <router-view></router-view>
  </el-config-provider>
</template>

<script setup lang="ts">
  import { reactive, computed } from 'vue';
  import { ElConfigProvider } from 'element-plus';
  import useGlobalStore from '@/stores/modules/useGlobalStore';

  // 全局状态
  const globalStore = useGlobalStore();

  // 配置element按钮文字中间是否有空格
  const buttonConfig = reactive({
    autoInsertSpace: false
  });

  // 配置全局组件尺寸
  const elementSize = computed(() => globalStore.elementSize);
</script>

<!-- <style scoped lang="scss"></style> -->
